import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },

    {
        path: '/login',
        name: 'login',
        component: () => import(/* webpackChunkName: "about" */ '../views/Login/LoginView')
    },
    {
        path: '/register',
        name: 'register',
        component: () => import(/* webpackChunkName: "about" */ '../views/Login/RegisterView')
    },
    {
        path: '/page/:id',
        name: 'page',
        component: () => import(/* webpackChunkName: "about" */ '../views/PageView/PageView.vue')
    },
    {
        path: '/changepage/:id',
        name: 'changepage',
        component: () => import(/* webpackChunkName: "about" */ '../views/PageView/ChangePage.vue')
    },
    {
        path: '/message',
        name: 'message',
        component: () => import(/* webpackChunkName: "about" */ '../views/MyView/MyMessage')
    },
    {
        path: '/changemessage',
        name: 'changemessage',
        component: () => import(/* webpackChunkName: "about" */ '../views/MyView/ChangeMessage.vue')
    },
    {
        path: '/mylike',
        name: 'mylike',
        component: () => import(/* webpackChunkName: "about" */ '../views/MyView/MyLike.vue')
    },
    {
        path: '/mystar',
        name: 'mystar',
        component: () => import(/* webpackChunkName: "about" */ '../views/MyView/MyCollection.vue')
    },
    {
        path: '/myarticle',
        name: 'myarticle',
        component: () => import(/* webpackChunkName: "about" */ '../views/MyView/MyArticle.vue')
    },
    {
        path: '/publish',
        name: 'publish',
        component: () => import(/* webpackChunkName: "about" */ '../views/PublishView/PublishView.vue')
    }
]

const router = new VueRouter({
    routes
})

export default router
